#ifndef BASE_SIGNAL_H
#define BASE_SIGNAL_H

#include "Singleton.hpp"
#include "type.hpp"
#include <unordered_map>

namespace DBServer {
namespace Base {

class Signaler : public Singleton<Signaler>{
friend Singleton<Signaler>;

public:
    ~Signaler() = default;
    void init(std::unordered_map<signal_t, void(*)(int)> &signals);

private:
    Signaler() = default;
    Signaler(Signaler &) = delete;
    Signaler(Signaler &&) = delete;
    Signaler &operator=(const Signaler &) = delete;
    Signaler &operator=(const Signaler &&) = delete;
};

}   // namespace DBServer
}   // namespace Base


#endif // !BASE_SIGNAL_H